import pygame
import sys

pygame.init()

screen = pygame.display.set_mode((500, 500))
BC = 0, 0, 43
white = 255, 255, 255
screen.fill(BC)
# 矩形
pygame.draw.rect(screen, white, (10, 100, 20, 20), 2)
# 多边形
pygame.draw.polygon(screen, white, ((90, 90),(202, 220),(200, 400),(300,400),(370,100)),2)
# 圆形
pygame.draw.circle(screen,white,(300,200),100,2)
# 椭圆
pygame.draw.ellipse(screen,white, (30, 30, 400, 200), 2)
# 线段
pygame.draw.line(screen,(22, 212, 107),(400,100),(100,400),5)
pygame.draw.aaline(screen,(22, 212, 107),(100,200),(300,500),True)
# 弧
# 弧度的起始和终止值为弧度制

# arc_rect = pygame.draw.arc(screen,(0, 119, 184),(120,120,100,300),0,3.14/2,3)
begin = 50
end = 90
arc_rect = pygame.draw.arc(screen,(0, 119, 184),(120,120,300,300),(begin/360)*3.14,(end/360)*3.14,3)
pygame.draw.rect(screen,(170, 238, 187),arc_rect,1)
print(arc_rect)

while True:
    for e in pygame.event.get():
        if e.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
    pygame.display.update()
